// Atom.h: interface for the atom class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ATOM_H__D1158159_4F65_11D1_93BC_006097737B41__INCLUDED_)
#define AFX_ATOM_H__D1158159_4F65_11D1_93BC_006097737B41__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "Position.h"
#include <cstdlib>
#include <cmath>

class Pack { public: Position Vector1, Vector2; };



class Atom  
{
public:
	Atom(double InR, double InPhi, double InTheta,
		 double *pR, double *pPhi, double *pTheta, 
		 Pack   *DR, Pack   *DPhi, Pack   *DTheta,		 
		 Position *A1, Position *A2, Position *A3, Position *A4);
	virtual ~Atom() {}

	void Build(void);


private:
	Position *Atom1, *Atom2, *Atom3, *Atom4;
	double   *R, *Phi, *Theta;
	Pack     *RDerivative, *PhiDerivative, *ThetaDerivative;
	
	double BondLength, CosPhi, SinPhi, CosTheta, SinTheta;

	double DirectionOfPhi;

	Position XAxis, YAxis, ZAxis;

	void MakeParameters(void);
	void MakeBasis(void);
	void MakeAtom4(void);
	void MakeDerivativeVectors(void);
};


#endif // !defined(AFX_ATOM_H__D1158159_4F65_11D1_93BC_006097737B41__INCLUDED_)
